package com.developer.platform.domain.service;

import com.developer.platform.domain.security.AuthorizationInfo;
import java.util.List;
import org.springframework.security.core.Authentication;

/**
 * @author ：qiaoliang
 * @date ：2020-11-06
 */
public interface IAuthorizingRealm {
    /**
     * 权限认证
     *
     * @author ：qiaoliang
     * @param authenticationInfo : 身份信息
     * @return com.microorganism.platform.domain.security.AuthorizationInfo
     * @date 2020-11-06 17:06
     */
    List<AuthorizationInfo> doGetAuthorizationInfo(Authentication authenticationInfo);

    /**
     * 身份认证
     *
     * @author ：qiaoliang
     * @param authenticationInfo : 身份信息
     * @return com.microorganism.platform.domain.security.AuthorizationInfo
     * @date 2020-11-06 17:06
     */
    Authentication doGetAuthenticationInfo(Authentication authenticationInfo);

    /**
     *  初始化资源-权限
     *
     * @author ：qiaoliang
     * @date 2020-11-04 09:16
     */
    default void initializationResourceDefine(){

    }
}
